package com.example.statistics.ui.market

import android.os.Bundle
import com.example.statistics.bean.DefineInputBean
import com.example.statistics.bean.MarketBean
import com.example.statistics.bean.MarketCityBean
import com.example.statistics.common.BaseInputActivity
import com.example.statistics.ex.areaDialog
import com.example.statistics.net.UrlConfig
import com.example.statistics.weight.TextProcessingView

class MarketCityAddActivity : BaseInputActivity<MarketCityBean>() {

    val list = listOf("河南", "江苏", "浙江", "安徽", "陕西", "云南", "贵州", "四川")

    override val title: String
        get() = "开拓市场"

    override val url: String
        get() = UrlConfig.MARKET_CITY_ADD

    override val inputDataList: List<DefineInputBean>
        get() = listOf(
            DefineInputBean(
                "省份：", "province", TextProcessingView.STYLE_SELECTOR, isNull = false,
                singleDialog = Pair(list) { str, list ->
                    list["province"]?.contentText = str
                }
            ),
            DefineInputBean(
                "城市：", "city", TextProcessingView.STYLE_SELECTOR, isNull = false, clicked = {
                    areaDialog { province, city, area ->

                    }
                }
            ),
        )
}